

#include "include.h"

NS_IMPL_ISUPPORTS1(MessageTask, nsIRunnable);

MessageTask::MessageTask(nsAutoString& title, nsAutoString& message, nsCOMPtr<nsIMessagePipe> messagePipe) : 
	m_title(title), 
	m_message(message)
{
	m_messagePipe = messagePipe;
}

MessageTask::MessageTask(const PRUnichar* title, const PRUnichar* message, nsCOMPtr<nsIMessagePipe> messagePipe) : 
	m_title(title), 
	m_message(message)
{
	m_messagePipe = messagePipe;
}

MessageTask::~MessageTask()
{
	
}

/* readonly attribute wstring name; */
NS_IMETHODIMP MessageTask::Run()
{
	m_messagePipe->Send(m_title.get(), m_message.get());
	return NS_OK;
}
